package com.budee.boke.service.impl;

import org.springframework.beans.factory.annotation.Autowired;


import org.springframework.stereotype.Service;

import com.budee.boke.dao.UserMapper;
import com.budee.boke.model.User;
import com.budee.boke.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userDao;
	
	public void add(User user) {
		userDao.insert(user);
	}

	public void delete(int id) {
		userDao.deleteByPrimaryKey(id);
		
	}

	public void update(User user) {
		
		userDao.updateByPrimaryKey(user);
	}

	public User find(int id) {
		
		return userDao.selectByPrimaryKey(id);
	}

}
